<?xml version='1.0' encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html lang="en" xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <link href="cpip.css" rel="stylesheet" type="text/css" />
    <title>File: /Users/paulross/dev/linux/linux-3.13/include/linux/printk.h</title>
  </head>
  <body>
    <h1>File: /Users/paulross/dev/linux/linux-3.13/include/linux/printk.h</h1>
    <p>Green shading in the line number column
means the source is part of the translation unit, red means it is conditionally excluded.
Highlighted line numbers link to the translation unit page. Highlighted macros link to
the macro page.</p>
    <pre><a name="1" /><span class="True">       1:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_noref.html#_X19LRVJORUxfUFJJTlRLX19fMA__"><span class="b">__KERNEL_PRINTK__</span></a>
<a name="2" /><span class="True">       2:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_X19LRVJORUxfUFJJTlRLX19fMA__"><span class="b">__KERNEL_PRINTK__</span></a>
<a name="3" /><span class="True">       3:</span> 
<a name="4" /><span class="True">       4:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">stdarg</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="5" /><span class="True">       5:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">init</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="6" /><span class="True">       6:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">kern_levels</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="7" /><span class="True">       7:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">linkage</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="8" /><span class="True">       8:</span> 
<a name="9" /><span class="True">       9:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">char</span> <span class="b">linux_banner</span><span class="f">[</span><span class="f">]</span><span class="f">;</span>
<a name="10" /><span class="True">      10:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">char</span> <span class="b">linux_proc_banner</span><span class="f">[</span><span class="f">]</span><span class="f">;</span>
<a name="11" /><span class="True">      11:</span> 
<a name="12" /><span class="True">      12:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <span class="b">printk_get_level</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">buffer</span><span class="f">)</span>
<a name="13" /><span class="True">      13:</span> <span class="f">{</span>
<a name="14" /><span class="True">      14:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">buffer</span><span class="f">[</span><span class="c">0</span><span class="f">]</span> <span class="f">==</span> <a href="cpu.c_macros_ref.html#_S0VSTl9TT0hfQVNDSUlfMA__"><span class="b">KERN_SOH_ASCII</span></a> <span class="f">&amp;&amp;</span> <span class="b">buffer</span><span class="f">[</span><span class="c">1</span><span class="f">]</span><span class="f">)</span> <span class="f">{</span>
<a name="15" /><span class="True">      15:</span>         <span class="m">switch</span> <span class="f">(</span><span class="b">buffer</span><span class="f">[</span><span class="c">1</span><span class="f">]</span><span class="f">)</span> <span class="f">{</span>
<a name="16" /><span class="True">      16:</span>         <span class="m">case</span> <span class="d">&apos;0&apos;</span> <span class="f">...</span> <span class="d">&apos;7&apos;</span><span class="f">:</span>
<a name="17" /><span class="True">      17:</span>         <span class="m">case</span> <span class="d">&apos;d&apos;</span><span class="f">:</span>    <span class="k">/* KERN_DEFAULT */</span>
<a name="18" /><span class="True">      18:</span>             <span class="m">return</span> <span class="b">buffer</span><span class="f">[</span><span class="c">1</span><span class="f">]</span><span class="f">;</span>
<a name="19" /><span class="True">      19:</span>         <span class="f">}</span>
<a name="20" /><span class="True">      20:</span>     <span class="f">}</span>
<a name="21" /><span class="True">      21:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="22" /><span class="True">      22:</span> <span class="f">}</span>
<a name="23" /><span class="True">      23:</span> 
<a name="24" /><span class="True">      24:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">printk_skip_level</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">buffer</span><span class="f">)</span>
<a name="25" /><span class="True">      25:</span> <span class="f">{</span>
<a name="26" /><span class="True">      26:</span>     <span class="m">if</span> <span class="f">(</span><span class="b">printk_get_level</span><span class="f">(</span><span class="b">buffer</span><span class="f">)</span><span class="f">)</span> <span class="f">{</span>
<a name="27" /><span class="True">      27:</span>         <span class="m">switch</span> <span class="f">(</span><span class="b">buffer</span><span class="f">[</span><span class="c">1</span><span class="f">]</span><span class="f">)</span> <span class="f">{</span>
<a name="28" /><span class="True">      28:</span>         <span class="m">case</span> <span class="d">&apos;0&apos;</span> <span class="f">...</span> <span class="d">&apos;7&apos;</span><span class="f">:</span>
<a name="29" /><span class="True">      29:</span>         <span class="m">case</span> <span class="d">&apos;d&apos;</span><span class="f">:</span>    <span class="k">/* KERN_DEFAULT */</span>
<a name="30" /><span class="True">      30:</span>             <span class="m">return</span> <span class="b">buffer</span> <span class="f">+</span> <span class="c">2</span><span class="f">;</span>
<a name="31" /><span class="True">      31:</span>         <span class="f">}</span>
<a name="32" /><span class="True">      32:</span>     <span class="f">}</span>
<a name="33" /><span class="True">      33:</span>     <span class="m">return</span> <span class="b">buffer</span><span class="f">;</span>
<a name="34" /><span class="True">      34:</span> <span class="f">}</span>
<a name="35" /><span class="True">      35:</span> 
<a name="36" /><span class="True">      36:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">console_printk</span><span class="f">[</span><span class="f">]</span><span class="f">;</span>
<a name="37" /><span class="True">      37:</span> 
<a name="38" /><span class="True">      38:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_ref.html#_Y29uc29sZV9sb2dsZXZlbF8w"><span class="b">console_loglevel</span></a> <span class="f">(</span><span class="b">console_printk</span><span class="f">[</span><span class="c">0</span><span class="f">]</span><span class="f">)</span>
<a name="39" /><span class="True">      39:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZGVmYXVsdF9tZXNzYWdlX2xvZ2xldmVsXzA_"><span class="b">default_message_loglevel</span></a> <span class="f">(</span><span class="b">console_printk</span><span class="f">[</span><span class="c">1</span><span class="f">]</span><span class="f">)</span>
<a name="40" /><span class="True">      40:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_bWluaW11bV9jb25zb2xlX2xvZ2xldmVsXzA_"><span class="b">minimum_console_loglevel</span></a> <span class="f">(</span><span class="b">console_printk</span><span class="f">[</span><span class="c">2</span><span class="f">]</span><span class="f">)</span>
<a name="41" /><span class="True">      41:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_ZGVmYXVsdF9jb25zb2xlX2xvZ2xldmVsXzA_"><span class="b">default_console_loglevel</span></a> <span class="f">(</span><span class="b">console_printk</span><span class="f">[</span><span class="c">3</span><span class="f">]</span><span class="f">)</span>
<a name="42" /><span class="True">      42:</span> 
<a name="43" /><span class="True">      43:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">console_silent</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="44" /><span class="True">      44:</span> <span class="f">{</span>
<a name="45" /><span class="True">      45:</span>     <a href="cpu.c_macros_ref.html#_Y29uc29sZV9sb2dsZXZlbF8w"><span class="b">console_loglevel</span></a> <span class="f">=</span> <span class="c">0</span><span class="f">;</span>
<a name="46" /><span class="True">      46:</span> <span class="f">}</span>
<a name="47" /><span class="True">      47:</span> 
<a name="48" /><span class="True">      48:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">console_verbose</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="49" /><span class="True">      49:</span> <span class="f">{</span>
<a name="50" /><span class="True">      50:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_Y29uc29sZV9sb2dsZXZlbF8w"><span class="b">console_loglevel</span></a><span class="f">)</span>
<a name="51" /><span class="True">      51:</span>         <a href="cpu.c_macros_ref.html#_Y29uc29sZV9sb2dsZXZlbF8w"><span class="b">console_loglevel</span></a> <span class="f">=</span> <span class="c">15</span><span class="f">;</span>
<a name="52" /><span class="True">      52:</span> <span class="f">}</span>
<a name="53" /><span class="True">      53:</span> 
<a name="54" /><span class="True">      54:</span> <span class="m">struct</span> <span class="b">va_format</span> <span class="f">{</span>
<a name="55" /><span class="True">      55:</span>     <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">;</span>
<a name="56" /><span class="True">      56:</span>     <span class="b">va_list</span> <span class="f">*</span><span class="b">va</span><span class="f">;</span>
<a name="57" /><span class="True">      57:</span> <span class="f">}</span><span class="f">;</span>
<a name="58" /><span class="True">      58:</span> 
<a name="59" /><span class="True">      59:</span> <span class="k">/*</span>
<a name="60" /><span class="True">      60:</span> <span class="k"> * FW_BUG</span>
<a name="61" /><span class="True">      61:</span> <span class="k"> * Add this to a message where you are sure the firmware is buggy or behaves</span>
<a name="62" /><span class="True">      62:</span> <span class="k"> * really stupid or out of spec. Be aware that the responsible BIOS developer</span>
<a name="63" /><span class="True">      63:</span> <span class="k"> * should be able to fix this issue or at least get a concrete idea of the</span>
<a name="64" /><span class="True">      64:</span> <span class="k"> * problem by reading your message without the need of looking at the kernel</span>
<a name="65" /><span class="True">      65:</span> <span class="k"> * code.</span>
<a name="66" /><span class="True">      66:</span> <span class="k"> *</span>
<a name="67" /><span class="True">      67:</span> <span class="k"> * Use it for definite and high priority BIOS bugs.</span>
<a name="68" /><span class="True">      68:</span> <span class="k"> *</span>
<a name="69" /><span class="True">      69:</span> <span class="k"> * FW_WARN</span>
<a name="70" /><span class="True">      70:</span> <span class="k"> * Use it for not that clear (e.g. could the kernel messed up things already?)</span>
<a name="71" /><span class="True">      71:</span> <span class="k"> * and medium priority BIOS bugs.</span>
<a name="72" /><span class="True">      72:</span> <span class="k"> *</span>
<a name="73" /><span class="True">      73:</span> <span class="k"> * FW_INFO</span>
<a name="74" /><span class="True">      74:</span> <span class="k"> * Use this one if you want to tell the user or vendor about something</span>
<a name="75" /><span class="True">      75:</span> <span class="k"> * suspicious, but generally harmless related to the firmware.</span>
<a name="76" /><span class="True">      76:</span> <span class="k"> *</span>
<a name="77" /><span class="True">      77:</span> <span class="k"> * Use it for information or very low priority BIOS bugs.</span>
<a name="78" /><span class="True">      78:</span> <span class="k"> */</span>
<a name="79" /><span class="True">      79:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RldfQlVHXzA_"><span class="b">FW_BUG</span></a>        <span class="e">&quot;[Firmware Bug]: &quot;</span>
<a name="80" /><span class="True">      80:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RldfV0FSTl8w"><span class="b">FW_WARN</span></a>        <span class="e">&quot;[Firmware Warn]: &quot;</span>
<a name="81" /><span class="True">      81:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_RldfSU5GT18w"><span class="b">FW_INFO</span></a>        <span class="e">&quot;[Firmware Info]: &quot;</span>
<a name="82" /><span class="True">      82:</span> 
<a name="83" /><span class="True">      83:</span> <span class="k">/*</span>
<a name="84" /><span class="True">      84:</span> <span class="k"> * HW_ERR</span>
<a name="85" /><span class="True">      85:</span> <span class="k"> * Add this to a message for hardware errors, so that user can report</span>
<a name="86" /><span class="True">      86:</span> <span class="k"> * it to hardware vendor instead of LKML or software vendor.</span>
<a name="87" /><span class="True">      87:</span> <span class="k"> */</span>
<a name="88" /><span class="True">      88:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_SFdfRVJSXzA_"><span class="b">HW_ERR</span></a>        <span class="e">&quot;[Hardware Error]: &quot;</span>
<a name="89" /><span class="True">      89:</span> 
<a name="90" /><span class="True">      90:</span> <span class="k">/*</span>
<a name="91" /><span class="True">      91:</span> <span class="k"> * Dummy printk for disabled debugging statements to use whilst maintaining</span>
<a name="92" /><span class="True">      92:</span> <span class="k"> * gcc&apos;s format and side-effect checking.</span>
<a name="93" /><span class="True">      93:</span> <span class="k"> */</span>
<a name="94" /><span class="True">      94:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span>
<a name="95" /><span class="True">      95:</span> <span class="m">int</span> <span class="b">no_printk</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>
<a name="96" /><span class="True">      96:</span> <span class="f">{</span>
<a name="97" /><span class="True">      97:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="98" /><span class="True">      98:</span> <span class="f">}</span>
<a name="99" /><span class="True">      99:</span> 
<a name="100" /><span class="True">     100:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX0VBUkxZX1BSSU5US18w"><span class="b">CONFIG_EARLY_PRINTK</span></a>
<a name="101" /><span class="True">     101:</span> <span class="m">extern</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span>
<a name="102" /><span class="True">     102:</span> <span class="m">void</span> <span class="b">early_printk</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span><span class="f">;</span>
<a name="103" /><span class="True">     103:</span> <span class="m">void</span> <span class="b">early_vprintk</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="b">va_list</span> <span class="b">ap</span><span class="f">)</span><span class="f">;</span>
<a name="104" /><span class="False">     104:</span> <span class="f">#</span><span class="n">else</span>
<a name="105" /><span class="False">     105:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_X19jb2xkXzA_"><span class="b">__cold</span></a>
<a name="106" /><span class="False">     106:</span> <span class="m">void</span> <span class="b">early_printk</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">s</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> <span class="f">{</span> <span class="f">}</span>
<a name="107" /><span class="True">     107:</span> <span class="f">#</span><span class="n">endif</span>
<a name="108" /><span class="True">     108:</span> 
<a name="109" /><span class="True">     109:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BSSU5US18w"><span class="b">CONFIG_PRINTK</span></a>
<a name="110" /><span class="True">     110:</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">5</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="111" /><span class="True">     111:</span> <span class="m">int</span> <span class="b">vprintk_emit</span><span class="f">(</span><span class="m">int</span> <span class="b">facility</span><span class="f">,</span> <span class="m">int</span> <span class="b">level</span><span class="f">,</span>
<a name="112" /><span class="True">     112:</span>          <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">dict</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">dictlen</span><span class="f">,</span>
<a name="113" /><span class="True">     113:</span>          <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="b">va_list</span> <span class="b">args</span><span class="f">)</span><span class="f">;</span>
<a name="114" /><span class="True">     114:</span> 
<a name="115" /><span class="True">     115:</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="116" /><span class="True">     116:</span> <span class="m">int</span> <span class="b">vprintk</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="b">va_list</span> <span class="b">args</span><span class="f">)</span><span class="f">;</span>
<a name="117" /><span class="True">     117:</span> 
<a name="118" /><span class="True">     118:</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">5</span><span class="f">,</span> <span class="c">6</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_X19jb2xkXzA_"><span class="b">__cold</span></a>
<a name="119" /><span class="True">     119:</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <span class="m">int</span> <span class="b">printk_emit</span><span class="f">(</span><span class="m">int</span> <span class="b">facility</span><span class="f">,</span> <span class="m">int</span> <span class="b">level</span><span class="f">,</span>
<a name="120" /><span class="True">     120:</span>                <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">dict</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">dictlen</span><span class="f">,</span>
<a name="121" /><span class="True">     121:</span>                <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span><span class="f">;</span>
<a name="122" /><span class="True">     122:</span> 
<a name="123" /><span class="True">     123:</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_X19jb2xkXzA_"><span class="b">__cold</span></a>
<a name="124" /><span class="True">     124:</span> <span class="m">int</span> <span class="b">printk</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span><span class="f">;</span>
<a name="125" /><span class="True">     125:</span> 
<a name="126" /><span class="True">     126:</span> <span class="k">/*</span>
<a name="127" /><span class="True">     127:</span> <span class="k"> * Special printk facility for scheduler use only, _DO_NOT_USE_ !</span>
<a name="128" /><span class="True">     128:</span> <span class="k"> */</span>
<a name="129" /><span class="True">     129:</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_X19jb2xkXzA_"><span class="b">__cold</span></a> <span class="m">int</span> <span class="b">printk_sched</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span><span class="f">;</span>
<a name="130" /><span class="True">     130:</span> 
<a name="131" /><span class="True">     131:</span> <span class="k">/*</span>
<a name="132" /><span class="True">     132:</span> <span class="k"> * Please don&apos;t use printk_ratelimit(), because it shares ratelimiting state</span>
<a name="133" /><span class="True">     133:</span> <span class="k"> * with all other unrelated printk_ratelimit() callsites.  Instead use</span>
<a name="134" /><span class="True">     134:</span> <span class="k"> * printk_ratelimited() or plain old __ratelimit().</span>
<a name="135" /><span class="True">     135:</span> <span class="k"> */</span>
<a name="136" /><span class="True">     136:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">__printk_ratelimit</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">func</span><span class="f">)</span><span class="f">;</span>
<a name="137" /><span class="True">     137:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdF8w"><span class="b">printk_ratelimit</span></a><span class="f">(</span><span class="f">)</span> <span class="b">__printk_ratelimit</span><span class="f">(</span><span class="b">__func__</span><span class="f">)</span>
<a name="138" /><span class="True">     138:</span> <span class="m">extern</span> <span class="m">bool</span> <span class="b">printk_timed_ratelimit</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">caller_jiffies</span><span class="f">,</span>
<a name="139" /><span class="True">     139:</span>                    <span class="m">unsigned</span> <span class="m">int</span> <span class="b">interval_msec</span><span class="f">)</span><span class="f">;</span>
<a name="140" /><span class="True">     140:</span> 
<a name="141" /><span class="True">     141:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">printk_delay_msec</span><span class="f">;</span>
<a name="142" /><span class="True">     142:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">dmesg_restrict</span><span class="f">;</span>
<a name="143" /><span class="True">     143:</span> <span class="m">extern</span> <span class="m">int</span> <span class="b">kptr_restrict</span><span class="f">;</span>
<a name="144" /><span class="True">     144:</span> 
<a name="145" /><span class="True">     145:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">wake_up_klogd</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="146" /><span class="True">     146:</span> 
<a name="147" /><span class="True">     147:</span> <span class="m">void</span> <span class="b">log_buf_kexec_setup</span><span class="f">(</span><span class="m">void</span><span class="f">)</span><span class="f">;</span>
<a name="148" /><span class="True">     148:</span> <span class="m">void</span> <a href="cpu.c_macros_ref.html#_X19pbml0XzA_"><span class="b">__init</span></a> <span class="b">setup_log_buf</span><span class="f">(</span><span class="m">int</span> <span class="b">early</span><span class="f">)</span><span class="f">;</span>
<a name="149" /><span class="True">     149:</span> <span class="m">void</span> <span class="b">dump_stack_set_arch_desc</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span><span class="f">;</span>
<a name="150" /><span class="True">     150:</span> <span class="m">void</span> <span class="b">dump_stack_print_info</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">log_lvl</span><span class="f">)</span><span class="f">;</span>
<a name="151" /><span class="True">     151:</span> <span class="m">void</span> <span class="b">show_regs_print_info</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">log_lvl</span><span class="f">)</span><span class="f">;</span>
<a name="152" /><span class="False">     152:</span> <span class="f">#</span><span class="n">else</span>
<a name="153" /><span class="False">     153:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">0</span><span class="f">)</span>
<a name="154" /><span class="False">     154:</span> <span class="m">int</span> <span class="b">vprintk</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">s</span><span class="f">,</span> <span class="b">va_list</span> <span class="b">args</span><span class="f">)</span>
<a name="155" /><span class="False">     155:</span> <span class="f">{</span>
<a name="156" /><span class="False">     156:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="157" /><span class="False">     157:</span> <span class="f">}</span>
<a name="158" /><span class="False">     158:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_X19jb2xkXzA_"><span class="b">__cold</span></a>
<a name="159" /><span class="False">     159:</span> <span class="m">int</span> <span class="b">printk</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">s</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>
<a name="160" /><span class="False">     160:</span> <span class="f">{</span>
<a name="161" /><span class="False">     161:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="162" /><span class="False">     162:</span> <span class="f">}</span>
<a name="163" /><span class="False">     163:</span> <span class="m">static</span> <span class="m">inline</span> <a href="cpu.c_macros_ref.html#_X19wcmludGZfMA__"><span class="b">__printf</span></a><span class="f">(</span><span class="c">1</span><span class="f">,</span> <span class="c">2</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_X19jb2xkXzA_"><span class="b">__cold</span></a>
<a name="164" /><span class="False">     164:</span> <span class="m">int</span> <span class="b">printk_sched</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">s</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>
<a name="165" /><span class="False">     165:</span> <span class="f">{</span>
<a name="166" /><span class="False">     166:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="167" /><span class="False">     167:</span> <span class="f">}</span>
<a name="168" /><span class="False">     168:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">int</span> <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdF8w"><span class="b">printk_ratelimit</span></a><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="169" /><span class="False">     169:</span> <span class="f">{</span>
<a name="170" /><span class="False">     170:</span>     <span class="m">return</span> <span class="c">0</span><span class="f">;</span>
<a name="171" /><span class="False">     171:</span> <span class="f">}</span>
<a name="172" /><span class="False">     172:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">bool</span> <span class="b">printk_timed_ratelimit</span><span class="f">(</span><span class="m">unsigned</span> <span class="m">long</span> <span class="f">*</span><span class="b">caller_jiffies</span><span class="f">,</span>
<a name="173" /><span class="False">     173:</span>                       <span class="m">unsigned</span> <span class="m">int</span> <span class="b">interval_msec</span><span class="f">)</span>
<a name="174" /><span class="False">     174:</span> <span class="f">{</span>
<a name="175" /><span class="False">     175:</span>     <span class="m">return</span> <span class="m">false</span><span class="f">;</span>
<a name="176" /><span class="False">     176:</span> <span class="f">}</span>
<a name="177" /><span class="False">     177:</span> 
<a name="178" /><span class="False">     178:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">wake_up_klogd</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="179" /><span class="False">     179:</span> <span class="f">{</span>
<a name="180" /><span class="False">     180:</span> <span class="f">}</span>
<a name="181" /><span class="False">     181:</span> 
<a name="182" /><span class="False">     182:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">log_buf_kexec_setup</span><span class="f">(</span><span class="m">void</span><span class="f">)</span>
<a name="183" /><span class="False">     183:</span> <span class="f">{</span>
<a name="184" /><span class="False">     184:</span> <span class="f">}</span>
<a name="185" /><span class="False">     185:</span> 
<a name="186" /><span class="False">     186:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">setup_log_buf</span><span class="f">(</span><span class="m">int</span> <span class="b">early</span><span class="f">)</span>
<a name="187" /><span class="False">     187:</span> <span class="f">{</span>
<a name="188" /><span class="False">     188:</span> <span class="f">}</span>
<a name="189" /><span class="False">     189:</span> 
<a name="190" /><span class="False">     190:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">dump_stack_set_arch_desc</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>
<a name="191" /><span class="False">     191:</span> <span class="f">{</span>
<a name="192" /><span class="False">     192:</span> <span class="f">}</span>
<a name="193" /><span class="False">     193:</span> 
<a name="194" /><span class="False">     194:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">dump_stack_print_info</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">log_lvl</span><span class="f">)</span>
<a name="195" /><span class="False">     195:</span> <span class="f">{</span>
<a name="196" /><span class="False">     196:</span> <span class="f">}</span>
<a name="197" /><span class="False">     197:</span> 
<a name="198" /><span class="False">     198:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">show_regs_print_info</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">log_lvl</span><span class="f">)</span>
<a name="199" /><span class="False">     199:</span> <span class="f">{</span>
<a name="200" /><span class="False">     200:</span> <span class="f">}</span>
<a name="201" /><span class="True">     201:</span> <span class="f">#</span><span class="n">endif</span>
<a name="202" /><span class="True">     202:</span> 
<a name="203" /><span class="True">     203:</span> <span class="m">extern</span> <a href="cpu.c_macros_ref.html#_YXNtbGlua2FnZV8w"><span class="b">asmlinkage</span></a> <span class="m">void</span> <span class="b">dump_stack</span><span class="f">(</span><span class="m">void</span><span class="f">)</span> <a href="cpu.c_macros_ref.html#_X19jb2xkXzA_"><span class="b">__cold</span></a><span class="f">;</span>
<a name="204" /><span class="True">     204:</span> 
<a name="205" /><span class="True">     205:</span> <span class="f">#</span><span class="n">ifndef</span> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a>
<a name="206" /><span class="True">     206:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span> <span class="b">fmt</span>
<a name="207" /><span class="True">     207:</span> <span class="f">#</span><span class="n">endif</span>
<a name="208" /><span class="True">     208:</span> 
<a name="209" /><span class="True">     209:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZW1lcmdfMA__"><span class="b">pr_emerg</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="210" /><span class="True">     210:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9FTUVSR18w"><span class="b">KERN_EMERG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="211" /><span class="True">     211:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfYWxlcnRfMA__"><span class="b">pr_alert</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="212" /><span class="True">     212:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9BTEVSVF8w"><span class="b">KERN_ALERT</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="213" /><span class="True">     213:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfY3JpdF8w"><span class="b">pr_crit</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="214" /><span class="True">     214:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9DUklUXzA_"><span class="b">KERN_CRIT</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="215" /><span class="True">     215:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZXJyXzA_"><span class="b">pr_err</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="216" /><span class="True">     216:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9FUlJfMA__"><span class="b">KERN_ERR</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="217" /><span class="True">     217:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfd2FybmluZ18w"><span class="b">pr_warning</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="218" /><span class="True">     218:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9XQVJOSU5HXzA_"><span class="b">KERN_WARNING</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="219" /><span class="True">     219:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfd2Fybl8w"><span class="b">pr_warn</span></a> <a href="cpu.c_macros_noref.html#_cHJfd2FybmluZ18w"><span class="b">pr_warning</span></a>
<a name="220" /><span class="True">     220:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfbm90aWNlXzA_"><span class="b">pr_notice</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="221" /><span class="True">     221:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9OT1RJQ0VfMA__"><span class="b">KERN_NOTICE</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="222" /><span class="True">     222:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfaW5mb18w"><span class="b">pr_info</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="223" /><span class="True">     223:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9JTkZPXzA_"><span class="b">KERN_INFO</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="224" /><span class="True">     224:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfY29udF8w"><span class="b">pr_cont</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="225" /><span class="True">     225:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9DT05UXzA_"><span class="b">KERN_CONT</span></a> <span class="b">fmt</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="226" /><span class="True">     226:</span> 
<a name="227" /><span class="True">     227:</span> <span class="k">/* pr_devel() should produce zero code unless DEBUG is defined */</span>
<a name="228" /><span class="False">     228:</span> <span class="f">#</span><span class="n">ifdef</span> <span class="b">DEBUG</span>
<a name="229" /><span class="False">     229:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGV2ZWxfMA__"><span class="b">pr_devel</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="230" /><span class="False">     230:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="231" /><span class="True">     231:</span> <span class="f">#</span><span class="n">else</span>
<a name="232" /><span class="True">     232:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGV2ZWxfMA__"><span class="b">pr_devel</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="233" /><span class="True">     233:</span>     <span class="b">no_printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="234" /><span class="True">     234:</span> <span class="f">#</span><span class="n">endif</span>
<a name="235" /><span class="True">     235:</span> 
<a name="236" /><span class="True">     236:</span> <span class="f">#</span><span class="n">include</span> <span class="f">&lt;</span><span class="b">linux</span><span class="f">/</span><span class="b">dynamic_debug</span><span class="f">.</span><span class="b">h</span><span class="f">&gt;</span>
<a name="237" /><span class="True">     237:</span> 
<a name="238" /><span class="True">     238:</span> <span class="k">/* If you are writing a driver, please use dev_dbg instead */</span>
<a name="239" /><span class="False">     239:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_DYNAMIC_DEBUG</span><span class="f">)</span>
<a name="240" /><span class="False">     240:</span> <span class="k">/* dynamic_pr_debug() uses pr_fmt() internally so we don&apos;t need it here */</span>
<a name="241" /><span class="False">     241:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGVidWdfMA__"><span class="b">pr_debug</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="242" /><span class="False">     242:</span>     <a href="cpu.c_macros_noref.html#_ZHluYW1pY19wcl9kZWJ1Z18w"><span class="b">dynamic_pr_debug</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="243" /><span class="False">     243:</span> <span class="f">#</span><span class="n">elif</span> <span class="b">defined</span><span class="f">(</span><span class="b">DEBUG</span><span class="f">)</span>
<a name="244" /><span class="False">     244:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGVidWdfMA__"><span class="b">pr_debug</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="245" /><span class="False">     245:</span>     <span class="b">printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="246" /><span class="True">     246:</span> <span class="f">#</span><span class="n">else</span>
<a name="247" /><span class="True">     247:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGVidWdfMA__"><span class="b">pr_debug</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="248" /><span class="True">     248:</span>     <span class="b">no_printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="249" /><span class="True">     249:</span> <span class="f">#</span><span class="n">endif</span>
<a name="250" /><span class="True">     250:</span> 
<a name="251" /><span class="True">     251:</span> <span class="k">/*</span>
<a name="252" /><span class="True">     252:</span> <span class="k"> * Print a one-time message (analogous to WARN_ONCE() et al):</span>
<a name="253" /><span class="True">     253:</span> <span class="k"> */</span>
<a name="254" /><span class="True">     254:</span> 
<a name="255" /><span class="True">     255:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BSSU5US18w"><span class="b">CONFIG_PRINTK</span></a>
<a name="256" /><span class="True">     256:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>            \
<a name="257" /><span class="True">     257:</span> <span class="f">(</span><span class="f">{</span>                        \
<a name="258" /><span class="True">     258:</span>     <span class="m">static</span> <span class="m">bool</span> <span class="b">__print_once</span><span class="f">;</span>        \
<a name="259" /><span class="True">     259:</span>                         \
<a name="260" /><span class="True">     260:</span>     <span class="m">if</span> <span class="f">(</span><span class="f">!</span><span class="b">__print_once</span><span class="f">)</span> <span class="f">{</span>            \
<a name="261" /><span class="True">     261:</span>         <span class="b">__print_once</span> <span class="f">=</span> <span class="m">true</span><span class="f">;</span>        \
<a name="262" /><span class="True">     262:</span>         <span class="b">printk</span><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span><span class="f">;</span>    \
<a name="263" /><span class="True">     263:</span>     <span class="f">}</span>                    \
<a name="264" /><span class="True">     264:</span> <span class="f">}</span><span class="f">)</span>
<a name="265" /><span class="False">     265:</span> <span class="f">#</span><span class="n">else</span>
<a name="266" /><span class="False">     266:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>            \
<a name="267" /><span class="False">     267:</span>     <span class="b">no_printk</span><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="268" /><span class="True">     268:</span> <span class="f">#</span><span class="n">endif</span>
<a name="269" /><span class="True">     269:</span> 
<a name="270" /><span class="True">     270:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZW1lcmdfb25jZV8w"><span class="b">pr_emerg_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="271" /><span class="True">     271:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9FTUVSR18w"><span class="b">KERN_EMERG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="272" /><span class="True">     272:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfYWxlcnRfb25jZV8w"><span class="b">pr_alert_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="273" /><span class="True">     273:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9BTEVSVF8w"><span class="b">KERN_ALERT</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="274" /><span class="True">     274:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfY3JpdF9vbmNlXzA_"><span class="b">pr_crit_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="275" /><span class="True">     275:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9DUklUXzA_"><span class="b">KERN_CRIT</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="276" /><span class="True">     276:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZXJyX29uY2VfMA__"><span class="b">pr_err_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="277" /><span class="True">     277:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9FUlJfMA__"><span class="b">KERN_ERR</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="278" /><span class="True">     278:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfd2Fybl9vbmNlXzA_"><span class="b">pr_warn_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="279" /><span class="True">     279:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9XQVJOSU5HXzA_"><span class="b">KERN_WARNING</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="280" /><span class="True">     280:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfbm90aWNlX29uY2VfMA__"><span class="b">pr_notice_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                \
<a name="281" /><span class="True">     281:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9OT1RJQ0VfMA__"><span class="b">KERN_NOTICE</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="282" /><span class="True">     282:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfaW5mb19vbmNlXzA_"><span class="b">pr_info_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="283" /><span class="True">     283:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9JTkZPXzA_"><span class="b">KERN_INFO</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="284" /><span class="True">     284:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfY29udF9vbmNlXzA_"><span class="b">pr_cont_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="285" /><span class="True">     285:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9DT05UXzA_"><span class="b">KERN_CONT</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="286" /><span class="True">     286:</span> 
<a name="287" /><span class="False">     287:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">DEBUG</span><span class="f">)</span>
<a name="288" /><span class="False">     288:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGV2ZWxfb25jZV8w"><span class="b">pr_devel_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="289" /><span class="False">     289:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="290" /><span class="True">     290:</span> <span class="f">#</span><span class="n">else</span>
<a name="291" /><span class="True">     291:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGV2ZWxfb25jZV8w"><span class="b">pr_devel_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="292" /><span class="True">     292:</span>     <span class="b">no_printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="293" /><span class="True">     293:</span> <span class="f">#</span><span class="n">endif</span>
<a name="294" /><span class="True">     294:</span> 
<a name="295" /><span class="True">     295:</span> <span class="k">/* If you are writing a driver, please use dev_dbg instead */</span>
<a name="296" /><span class="False">     296:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">DEBUG</span><span class="f">)</span>
<a name="297" /><span class="False">     297:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGVidWdfb25jZV8w"><span class="b">pr_debug_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="298" /><span class="False">     298:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX29uY2VfMA__"><span class="b">printk_once</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="299" /><span class="True">     299:</span> <span class="f">#</span><span class="n">else</span>
<a name="300" /><span class="True">     300:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGVidWdfb25jZV8w"><span class="b">pr_debug_once</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="301" /><span class="True">     301:</span>     <span class="b">no_printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="302" /><span class="True">     302:</span> <span class="f">#</span><span class="n">endif</span>
<a name="303" /><span class="True">     303:</span> 
<a name="304" /><span class="True">     304:</span> <span class="k">/*</span>
<a name="305" /><span class="True">     305:</span> <span class="k"> * ratelimited messages with local ratelimit_state,</span>
<a name="306" /><span class="True">     306:</span> <span class="k"> * no local ratelimit_state used in the !PRINTK case</span>
<a name="307" /><span class="True">     307:</span> <span class="k"> */</span>
<a name="308" /><span class="True">     308:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BSSU5US18w"><span class="b">CONFIG_PRINTK</span></a>
<a name="309" /><span class="True">     309:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="310" /><span class="True">     310:</span> <span class="f">(</span><span class="f">{</span>                                    \
<a name="311" /><span class="True">     311:</span>     <span class="m">static</span> <a href="cpu.c_macros_noref.html#_REVGSU5FX1JBVEVMSU1JVF9TVEFURV8w"><span class="b">DEFINE_RATELIMIT_STATE</span></a><span class="f">(</span><span class="b">_rs</span><span class="f">,</span>                \
<a name="312" /><span class="True">     312:</span>                       <a href="cpu.c_macros_noref.html#_REVGQVVMVF9SQVRFTElNSVRfSU5URVJWQUxfMA__"><span class="b">DEFAULT_RATELIMIT_INTERVAL</span></a><span class="f">,</span>    \
<a name="313" /><span class="True">     313:</span>                       <a href="cpu.c_macros_noref.html#_REVGQVVMVF9SQVRFTElNSVRfQlVSU1RfMA__"><span class="b">DEFAULT_RATELIMIT_BURST</span></a><span class="f">)</span><span class="f">;</span>        \
<a name="314" /><span class="True">     314:</span>                                     \
<a name="315" /><span class="True">     315:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_noref.html#_X19yYXRlbGltaXRfMA__"><span class="b">__ratelimit</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">_rs</span><span class="f">)</span><span class="f">)</span>                        \
<a name="316" /><span class="True">     316:</span>         <span class="b">printk</span><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span><span class="f">;</span>                \
<a name="317" /><span class="True">     317:</span> <span class="f">}</span><span class="f">)</span>
<a name="318" /><span class="False">     318:</span> <span class="f">#</span><span class="n">else</span>
<a name="319" /><span class="False">     319:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="320" /><span class="False">     320:</span>     <span class="b">no_printk</span><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="321" /><span class="True">     321:</span> <span class="f">#</span><span class="n">endif</span>
<a name="322" /><span class="True">     322:</span> 
<a name="323" /><span class="True">     323:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZW1lcmdfcmF0ZWxpbWl0ZWRfMA__"><span class="b">pr_emerg_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="324" /><span class="True">     324:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9FTUVSR18w"><span class="b">KERN_EMERG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="325" /><span class="True">     325:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfYWxlcnRfcmF0ZWxpbWl0ZWRfMA__"><span class="b">pr_alert_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="326" /><span class="True">     326:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9BTEVSVF8w"><span class="b">KERN_ALERT</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="327" /><span class="True">     327:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfY3JpdF9yYXRlbGltaXRlZF8w"><span class="b">pr_crit_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="328" /><span class="True">     328:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9DUklUXzA_"><span class="b">KERN_CRIT</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="329" /><span class="True">     329:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZXJyX3JhdGVsaW1pdGVkXzA_"><span class="b">pr_err_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="330" /><span class="True">     330:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9FUlJfMA__"><span class="b">KERN_ERR</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="331" /><span class="True">     331:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfd2Fybl9yYXRlbGltaXRlZF8w"><span class="b">pr_warn_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="332" /><span class="True">     332:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9XQVJOSU5HXzA_"><span class="b">KERN_WARNING</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="333" /><span class="True">     333:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfbm90aWNlX3JhdGVsaW1pdGVkXzA_"><span class="b">pr_notice_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="334" /><span class="True">     334:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9OT1RJQ0VfMA__"><span class="b">KERN_NOTICE</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="335" /><span class="True">     335:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfaW5mb19yYXRlbGltaXRlZF8w"><span class="b">pr_info_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="336" /><span class="True">     336:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_ref.html#_S0VSTl9JTkZPXzA_"><span class="b">KERN_INFO</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="337" /><span class="True">     337:</span> <span class="k">/* no pr_cont_ratelimited, don&apos;t do that... */</span>
<a name="338" /><span class="True">     338:</span> 
<a name="339" /><span class="False">     339:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">DEBUG</span><span class="f">)</span>
<a name="340" /><span class="False">     340:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGV2ZWxfcmF0ZWxpbWl0ZWRfMA__"><span class="b">pr_devel_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="341" /><span class="False">     341:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="342" /><span class="True">     342:</span> <span class="f">#</span><span class="n">else</span>
<a name="343" /><span class="True">     343:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGV2ZWxfcmF0ZWxpbWl0ZWRfMA__"><span class="b">pr_devel_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="344" /><span class="True">     344:</span>     <span class="b">no_printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="345" /><span class="True">     345:</span> <span class="f">#</span><span class="n">endif</span>
<a name="346" /><span class="True">     346:</span> 
<a name="347" /><span class="True">     347:</span> <span class="k">/* If you are writing a driver, please use dev_dbg instead */</span>
<a name="348" /><span class="False">     348:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_DYNAMIC_DEBUG</span><span class="f">)</span>
<a name="349" /><span class="False">     349:</span> <span class="k">/* descriptor check is first to prevent flooding with &quot;callbacks suppressed&quot; */</span>
<a name="350" /><span class="False">     350:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGVidWdfcmF0ZWxpbWl0ZWRfMA__"><span class="b">pr_debug_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="351" /><span class="False">     351:</span> <span class="m">do</span> <span class="f">{</span>                                    \
<a name="352" /><span class="False">     352:</span>     <span class="m">static</span> <a href="cpu.c_macros_noref.html#_REVGSU5FX1JBVEVMSU1JVF9TVEFURV8w"><span class="b">DEFINE_RATELIMIT_STATE</span></a><span class="f">(</span><span class="b">_rs</span><span class="f">,</span>                \
<a name="353" /><span class="False">     353:</span>                       <a href="cpu.c_macros_noref.html#_REVGQVVMVF9SQVRFTElNSVRfSU5URVJWQUxfMA__"><span class="b">DEFAULT_RATELIMIT_INTERVAL</span></a><span class="f">,</span>    \
<a name="354" /><span class="False">     354:</span>                       <a href="cpu.c_macros_noref.html#_REVGQVVMVF9SQVRFTElNSVRfQlVSU1RfMA__"><span class="b">DEFAULT_RATELIMIT_BURST</span></a><span class="f">)</span><span class="f">;</span>        \
<a name="355" /><span class="False">     355:</span>     <span class="b">DEFINE_DYNAMIC_DEBUG_METADATA</span><span class="f">(</span><span class="b">descriptor</span><span class="f">,</span> <span class="b">fmt</span><span class="f">)</span><span class="f">;</span>            \
<a name="356" /><span class="False">     356:</span>     <span class="m">if</span> <span class="f">(</span><a href="cpu.c_macros_ref.html#_dW5saWtlbHlfMA__"><span class="b">unlikely</span></a><span class="f">(</span><span class="b">descriptor</span><span class="f">.</span><span class="b">flags</span> <span class="f">&amp;</span> <a href="cpu.c_macros_noref.html#_X0RQUklOVEtfRkxBR1NfUFJJTlRfMA__"><span class="b">_DPRINTK_FLAGS_PRINT</span></a><span class="f">)</span> <span class="f">&amp;&amp;</span>    \
<a name="357" /><span class="False">     357:</span>         <a href="cpu.c_macros_noref.html#_X19yYXRlbGltaXRfMA__"><span class="b">__ratelimit</span></a><span class="f">(</span><span class="f">&amp;</span><span class="b">_rs</span><span class="f">)</span><span class="f">)</span>                        \
<a name="358" /><span class="False">     358:</span>         <span class="b">__dynamic_pr_debug</span><span class="f">(</span><span class="f">&amp;</span><span class="b">descriptor</span><span class="f">,</span> <span class="b">fmt</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span><span class="f">;</span>    \
<a name="359" /><span class="False">     359:</span> <span class="f">}</span> <span class="m">while</span> <span class="f">(</span><span class="c">0</span><span class="f">)</span>
<a name="360" /><span class="False">     360:</span> <span class="f">#</span><span class="n">elif</span> <span class="b">defined</span><span class="f">(</span><span class="b">DEBUG</span><span class="f">)</span>
<a name="361" /><span class="False">     361:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGVidWdfcmF0ZWxpbWl0ZWRfMA__"><span class="b">pr_debug_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span>                    \
<a name="362" /><span class="False">     362:</span>     <a href="cpu.c_macros_noref.html#_cHJpbnRrX3JhdGVsaW1pdGVkXzA_"><span class="b">printk_ratelimited</span></a><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="363" /><span class="True">     363:</span> <span class="f">#</span><span class="n">else</span>
<a name="364" /><span class="True">     364:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJfZGVidWdfcmF0ZWxpbWl0ZWRfMA__"><span class="b">pr_debug_ratelimited</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">,</span> <span class="f">...</span><span class="f">)</span> \
<a name="365" /><span class="True">     365:</span>     <span class="b">no_printk</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a> <a href="cpu.c_macros_noref.html#_cHJfZm10XzA_"><span class="b">pr_fmt</span></a><span class="f">(</span><span class="b">fmt</span><span class="f">)</span><span class="f">,</span> <span class="f">##</span><span class="b">__VA_ARGS__</span><span class="f">)</span>
<a name="366" /><span class="True">     366:</span> <span class="f">#</span><span class="n">endif</span>
<a name="367" /><span class="True">     367:</span> 
<a name="368" /><span class="True">     368:</span> <span class="m">extern</span> <span class="m">const</span> <span class="m">struct</span> <span class="b">file_operations</span> <span class="b">kmsg_fops</span><span class="f">;</span>
<a name="369" /><span class="True">     369:</span> 
<a name="370" /><span class="True">     370:</span> <span class="m">enum</span> <span class="f">{</span>
<a name="371" /><span class="True">     371:</span>     <span class="b">DUMP_PREFIX_NONE</span><span class="f">,</span>
<a name="372" /><span class="True">     372:</span>     <span class="b">DUMP_PREFIX_ADDRESS</span><span class="f">,</span>
<a name="373" /><span class="True">     373:</span>     <span class="b">DUMP_PREFIX_OFFSET</span>
<a name="374" /><span class="True">     374:</span> <span class="f">}</span><span class="f">;</span>
<a name="375" /><span class="True">     375:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">hex_dump_to_buffer</span><span class="f">(</span><span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">buf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span>
<a name="376" /><span class="True">     376:</span>                    <span class="m">int</span> <span class="b">rowsize</span><span class="f">,</span> <span class="m">int</span> <span class="b">groupsize</span><span class="f">,</span>
<a name="377" /><span class="True">     377:</span>                    <span class="m">char</span> <span class="f">*</span><span class="b">linebuf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">linebuflen</span><span class="f">,</span> <span class="m">bool</span> <span class="b">ascii</span><span class="f">)</span><span class="f">;</span>
<a name="378" /><span class="True">     378:</span> <span class="f">#</span><span class="n">ifdef</span> <a href="cpu.c_macros_ref.html#_Q09ORklHX1BSSU5US18w"><span class="b">CONFIG_PRINTK</span></a>
<a name="379" /><span class="True">     379:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">print_hex_dump</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">level</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">prefix_str</span><span class="f">,</span>
<a name="380" /><span class="True">     380:</span>                <span class="m">int</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="m">int</span> <span class="b">rowsize</span><span class="f">,</span> <span class="m">int</span> <span class="b">groupsize</span><span class="f">,</span>
<a name="381" /><span class="True">     381:</span>                <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">buf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span> <span class="m">bool</span> <span class="b">ascii</span><span class="f">)</span><span class="f">;</span>
<a name="382" /><span class="False">     382:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_DYNAMIC_DEBUG</span><span class="f">)</span>
<a name="383" /><span class="False">     383:</span> <span class="f">#</span><span class="n">define</span> <span class="b">print_hex_dump_bytes</span><span class="f">(</span><span class="b">prefix_str</span><span class="f">,</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="b">buf</span><span class="f">,</span> <span class="b">len</span><span class="f">)</span>    \
<a name="384" /><span class="False">     384:</span>     <span class="b">dynamic_hex_dump</span><span class="f">(</span><span class="b">prefix_str</span><span class="f">,</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="c">16</span><span class="f">,</span> <span class="c">1</span><span class="f">,</span> <span class="b">buf</span><span class="f">,</span> <span class="b">len</span><span class="f">,</span> <span class="m">true</span><span class="f">)</span>
<a name="385" /><span class="True">     385:</span> <span class="f">#</span><span class="n">else</span>
<a name="386" /><span class="True">     386:</span> <span class="m">extern</span> <span class="m">void</span> <span class="b">print_hex_dump_bytes</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">prefix_str</span><span class="f">,</span> <span class="m">int</span> <span class="b">prefix_type</span><span class="f">,</span>
<a name="387" /><span class="True">     387:</span>                  <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">buf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">)</span><span class="f">;</span>
<a name="388" /><span class="True">     388:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* defined(CONFIG_DYNAMIC_DEBUG) */</span>
<a name="389" /><span class="False">     389:</span> <span class="f">#</span><span class="n">else</span>
<a name="390" /><span class="False">     390:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">print_hex_dump</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">level</span><span class="f">,</span> <span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">prefix_str</span><span class="f">,</span>
<a name="391" /><span class="False">     391:</span>                   <span class="m">int</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="m">int</span> <span class="b">rowsize</span><span class="f">,</span> <span class="m">int</span> <span class="b">groupsize</span><span class="f">,</span>
<a name="392" /><span class="False">     392:</span>                   <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">buf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">,</span> <span class="m">bool</span> <span class="b">ascii</span><span class="f">)</span>
<a name="393" /><span class="False">     393:</span> <span class="f">{</span>
<a name="394" /><span class="False">     394:</span> <span class="f">}</span>
<a name="395" /><span class="False">     395:</span> <span class="m">static</span> <span class="m">inline</span> <span class="m">void</span> <span class="b">print_hex_dump_bytes</span><span class="f">(</span><span class="m">const</span> <span class="m">char</span> <span class="f">*</span><span class="b">prefix_str</span><span class="f">,</span> <span class="m">int</span> <span class="b">prefix_type</span><span class="f">,</span>
<a name="396" /><span class="False">     396:</span>                     <span class="m">const</span> <span class="m">void</span> <span class="f">*</span><span class="b">buf</span><span class="f">,</span> <span class="b">size_t</span> <span class="b">len</span><span class="f">)</span>
<a name="397" /><span class="False">     397:</span> <span class="f">{</span>
<a name="398" /><span class="False">     398:</span> <span class="f">}</span>
<a name="399" /><span class="False">     399:</span> 
<a name="400" /><span class="True">     400:</span> <span class="f">#</span><span class="n">endif</span>
<a name="401" /><span class="True">     401:</span> 
<a name="402" /><span class="False">     402:</span> <span class="f">#</span><span class="n">if</span> <span class="b">defined</span><span class="f">(</span><span class="b">CONFIG_DYNAMIC_DEBUG</span><span class="f">)</span>
<a name="403" /><span class="False">     403:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJpbnRfaGV4X2R1bXBfZGVidWdfMA__"><span class="b">print_hex_dump_debug</span></a><span class="f">(</span><span class="b">prefix_str</span><span class="f">,</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="b">rowsize</span><span class="f">,</span>    \
<a name="404" /><span class="False">     404:</span>                  <span class="b">groupsize</span><span class="f">,</span> <span class="b">buf</span><span class="f">,</span> <span class="b">len</span><span class="f">,</span> <span class="b">ascii</span><span class="f">)</span>    \
<a name="405" /><span class="False">     405:</span>     <span class="b">dynamic_hex_dump</span><span class="f">(</span><span class="b">prefix_str</span><span class="f">,</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="b">rowsize</span><span class="f">,</span>    \
<a name="406" /><span class="False">     406:</span>              <span class="b">groupsize</span><span class="f">,</span> <span class="b">buf</span><span class="f">,</span> <span class="b">len</span><span class="f">,</span> <span class="b">ascii</span><span class="f">)</span>
<a name="407" /><span class="True">     407:</span> <span class="f">#</span><span class="n">else</span>
<a name="408" /><span class="True">     408:</span> <span class="f">#</span><span class="n">define</span> <a href="cpu.c_macros_noref.html#_cHJpbnRfaGV4X2R1bXBfZGVidWdfMA__"><span class="b">print_hex_dump_debug</span></a><span class="f">(</span><span class="b">prefix_str</span><span class="f">,</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="b">rowsize</span><span class="f">,</span>        \
<a name="409" /><span class="True">     409:</span>                  <span class="b">groupsize</span><span class="f">,</span> <span class="b">buf</span><span class="f">,</span> <span class="b">len</span><span class="f">,</span> <span class="b">ascii</span><span class="f">)</span>        \
<a name="410" /><span class="True">     410:</span>     <span class="b">print_hex_dump</span><span class="f">(</span><a href="cpu.c_macros_noref.html#_S0VSTl9ERUJVR18w"><span class="b">KERN_DEBUG</span></a><span class="f">,</span> <span class="b">prefix_str</span><span class="f">,</span> <span class="b">prefix_type</span><span class="f">,</span> <span class="b">rowsize</span><span class="f">,</span>    \
<a name="411" /><span class="True">     411:</span>                <span class="b">groupsize</span><span class="f">,</span> <span class="b">buf</span><span class="f">,</span> <span class="b">len</span><span class="f">,</span> <span class="b">ascii</span><span class="f">)</span>
<a name="412" /><span class="True">     412:</span> <span class="f">#</span><span class="n">endif</span> <span class="k">/* defined(CONFIG_DYNAMIC_DEBUG) */</span>
<a name="413" /><span class="True">     413:</span> 
<a name="414" /><span class="True">     414:</span> <span class="f">#</span><span class="n">endif</span>
<a name="415" /><span class="True">     415:</span> </pre>
  </body>
</html>
